#include "widget.h"
#include "ui_widget.h"


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    // 创建一个图标对象
    QIcon icon(":/dongman.jpg");
    //设置图标
    ui->pushButton->setIcon(icon);
    //设置图标尺寸
//    QSize qsize(50, 50);
//    ui->pushButton->setIconSize(qsize);
    ui->pushButton->setIconSize(QSize(50, 50));
}

Widget::~Widget()
{
    delete ui;
}

